package com.eastfair.venuebooking.api;

import com.eastfair.core.base.R;
import com.eastfair.venuebooking.dto.ExhibitionDTO;
import com.eastfair.venuebooking.vo.ExhibitionVO;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;


/**
 * 展会 feign
 * @author linan
 */
@FeignClient(value = "venue-booking/exhibition")
public interface ExhibitionFeign {

    /**
     * 同步综合展会管理信息
     * @param exhibitionDTO exhibitionDTO
     * @return R<Boolean>
     */
    @PostMapping("/syncExhibitionManage")
    R<Boolean> syncExhibitionManage(@RequestBody ExhibitionDTO exhibitionDTO);

    /**
     * 查询展会项目名称
     * @param exhibitionId exhibitionId
     * @return R
     */
    @ApiOperation(value = "查询展会项目名称", notes = "查询展会项目名称")
    @GetMapping("/queryProjectName")
    R<String> queryProjectName(@RequestParam("exhibitionId") Long exhibitionId);

    /**
     * 查询展会未同步的所有展会
     *
     * @return R
     */
    @ApiOperation(value = "查询展会未同步的所有展会", notes = "查询展会未同步的所有展会")
    @PostMapping("/queryNeedSyncExhibition")
    R<List<ExhibitionVO>> queryNeedSyncExhibition();
}
